cmake_minimum_required(VERSION 3.0.2)
project(nav_utils)

## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)

find_package(Eigen3 REQUIRED)
find_package(PCL REQUIRED)

find_package(catkin REQUIRED COMPONENTS
  std_msgs
  quad_msgs
  roscpp
  rosbag
  transform_utils
  trajectory_msgs
  dji_osdk_ros
  trajectory_optimization
)

catkin_package()

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
  ${EIGEN3_INCLUDE_DIRS}
  ${PCL_INCLUDE_DIRS}
)

add_executable(record_manual_flight src/record_manual_flight.cpp)
target_link_libraries(record_manual_flight
  ${catkin_LIBRARIES}
)

add_executable(optimize_manual_traj src/optimize_manual_traj.cpp)
target_link_libraries(optimize_manual_traj
  ${catkin_LIBRARIES}
  ${PCL_LIBRARIES}
)

add_library(manual_traj_optimizer src/manual_traj_optimizer.cpp)
target_link_libraries(manual_traj_optimizer
  ${catkin_LIBRARIES}
  ${PCL_LIBRARIES}
)
add_executable(manual_traj_optimizer_node src/manual_traj_optimizer_node.cpp)
target_link_libraries(manual_traj_optimizer_node
  ${catkin_LIBRARIES}
  manual_traj_optimizer
)